<template>
    <view class="bg-content">
        <scroll-view scroll-x="true">
            <div class="table table-bordered" style="width: 800px; text-align: center; background: white;">
                <div class="tr">
                    <div class="td text-center bold">提现金额</div>
                    <div class="td text-center bold">提现编号</div>
                    <div class="td text-center bold">提现流水号</div>
                    <div class="td text-center bold">创建时间</div>
                </div>
                <div class="tr" v-for="(item, index)  in dataList" :key="item.id">
                    <div class="td">￥{{item.money | toFixed2}}</div>
                    <div class="td">{{item.withdrawalCode}}</div>
                    <div class="td">{{item.withdrawalTradeNo}}</div>
                    <div class="td">{{item.createTime}}</div>
                </div>
            </div>
        </scroll-view>

        <div style="padding-top: 10px; padding-bottom: 10px;">
            <u-loadmore :status="pagination.status" bg-color="#eeeeee"/>
        </div>
    </view>
</template>

<script>

    import {TbStoreCashDepositWithdrawalRecordService} from "../../../../../../dev/services/tb-store-cash-deposit-withdrawal-record.service";

    export default {
        data() {
            return {
                dataList: [],
                searchKeyword: '',
            }
        },
        onReady() {
            const _self = this;
        },
        methods: {
            /**
             * 加载更多数据中
             * @param infiniteScroll
             */
            doInfinite(infiniteScroll) {
                const _self = this;
                new TbStoreCashDepositWithdrawalRecordService().findTableTbStoreCashDepositWithdrawalRecordList({
                    pagination: _self.pagination,
                    data: {
                        storeId: _self.globalVariable.userInfo.tbStore.id,
                        isHaveWithdrawal: true,
                        searchKeyword: _self.searchKeyword,
                        status: "1",
                        orderBy: 'create_time desc'
                    },
                }).then(result => {
                    console.log(_self.dataList);
                    _self.pagination.refreshPage(result);
                    _self.dataList = [..._self.dataList, ...result.list]
                });
            },
        }
    }
</script>

<style lang="scss" scoped>
</style>
